<HTML><HEAD><TITLE>append_strings(?String1, ?String2, ?String3)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Strings and Atoms</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>append_strings(?String1, ?String2, ?String3)</H1>
Succeeds if String3 is the concatenation of String1 and String2.


<DL>
<DT><EM>String1</EM></DT>
<DD>String or variable.
</DD>
<DT><EM>String2</EM></DT>
<DD>String or variable.
</DD>
<DT><EM>String3</EM></DT>
<DD>String or variable.
</DD>
</DL>
<H2>Description</H2>
   Succeeds if String3 is the concatenation of String1 and String2.

<P>
   Used to find all possible solutions for the concatenation of String1 and
   String2 to make String3.

<P>
   Note that if String1 and String2 are instantiated, it is more efficient
   to use the predicate concat_strings/3.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>append_strings(+, +, -) is det
<LI>append_strings(-, -, +) is multi
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(5) type error </EM>
<DD>One (or more) of the arguments is instantiated, but not to a    string.
<DT><EM>(4) instantiation fault </EM>
<DD>String3 and at least one other argument are uninstantiated.
</DL>
<H2>Examples</H2>
<PRE>
Success:
      append_strings("a",B,"abc"). (gives B = "bc").
      append_strings(A,B,"a").     (gives A=""  B="a";
                                          A="a" B="").
Fail:
      append_strings("a","b","abc").
Error:
      append_strings(A,"bc",C).        (Error 4).
      append_strings(5,B,C).           (Error 5).
      append_strings(A,'me',"meme").   (Error 5).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/stratom/concat_strings-3.html">concat_strings / 3</A>, <A HREF="../../kernel/stratom/concat_string-2.html">concat_string / 2</A>, <A HREF="../../kernel/stratom/join_string-3.html">join_string / 3</A>, <A HREF="../../kernel/ioterm/sprintf-3.html">sprintf / 3</A>
</BODY></HTML>
